import rclpy
from rclpy.node import Node
from rclpy.duration import Duration

class Mynode(Node):
    def __init__(self):
        super().__init__("duration_node_py")
        self.demo_duration()
    def demo_duration(self):
        du1=Duration(seconds=10,nanoseconds=800000000)
        self.get_logger().info(f"ns:{du1.nanoseconds}") 

def main():
    rclpy.init()
    rclpy.spin(Mynode())
    rclpy.shutdown()

if __name__=='__main__':
    main()
